package seqAlignment;

public class LinearGapPenalty implements GapPenalty {
	int k;
	
	@Override
	public int gapPenalty(int x, int y) {
		if ((x==0)||(y==0)) {
			return x*k+y*k;
		}
		return k;
	}


	@Override
	public int headPenalty(int x, int y) {
		return 0;
	}


	public LinearGapPenalty(int k) {
		this.k = k;
	}

}
